<?php

GaAPI_Autoloader::instance()->load('GaAPI_Objects_Common_Object');


abstract class GaAPI_Objects_Common_Selector extends GaAPI_Objects_Common_Object {

	public $statsSelector;
	public $paging;


    public function  __toString() {
        $xml = '<get xmlns="' . $this->getApi()->Campaigns()->getClient()->getNamespace() . '">';
        $xml .= '<selector>';

        $fields = $this->getFields();
        foreach ($fields as $field) {
            $xml .= ($this->$field) ? '<' . $field . '>' . $this->$field . '</' . $field. '>' : '';
        }

        $xml .= '</selector>';
        $xml .= '</get>';
        return $xml;
    }
}